//
//  GHChongZhiRecordCell.m
//  GodHorses
//
//  Created by Mac on 2017/11/16.
//  Copyright © 2017年 stoneobs@icloud.com. All rights reserved.
//

#import "BLRechangeTableViewCell.h"
@interface BLRechangeTableViewCell()
@property(nonatomic, strong) STButton                     *iconButton;
@property(nonatomic, strong) STLabel                      *nickNameLable;
@property(nonatomic, strong) STLabel                      *inputLable;//充值多少
@property(nonatomic, strong) STLabel                      *timeLable;
@end
@implementation BLRechangeTableViewCell

+ (CGFloat)CellHeight{
    return 50;
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self configSubView];
    }
    return self;
}
#pragma mark --subView
- (void)configSubView{
    self.backgroundColor = [UIColor whiteColor];
    
    self.iconButton = [[STButton alloc] initWithFrame:CGRectMake(15, 5, 40, 40)
                                                    title:nil
                                               titleColor:nil
                                                titleFont:15
                                             cornerRadius:20
                                          backgroundColor:nil
                                          backgroundImage:nil
                                                    image:[UIImage imageNamed:@"个人头像"]];

    [self addSubview:self.iconButton];
    
    self.inputLable = [[STLabel alloc] initWithFrame:CGRectMake(0, 16, 200, 20)
                                                text:@"+ 3000"
                                           textColor:BL_redColor
                                                font:18
                                         isSizetoFit:NO
                                       textAlignment:NSTextAlignmentRight];
    self.inputLable.st_right = UIScreenWidth - 15;
    self.inputLable.centerY = [BLRechangeTableViewCell CellHeight]/2;
    [self addSubview:self.inputLable];
    
    self.nickNameLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconButton.right + 20, self.iconButton.top , 300, 15)
                                                   text:@"nickName"
                                              textColor:BL_secendTextColor
                                                   font:14
                                            isSizetoFit:NO
                                          textAlignment:NSTextAlignmentLeft];
    [self addSubview:self.nickNameLable];
    
    
    self.timeLable = [[STLabel alloc] initWithFrame:CGRectMake(self.nickNameLable.left, self.nickNameLable.st_bottom + 3, 300, 15)
                                              text:@"2017年12月05日18:00:50"
                                         textColor:BL_thirdTextColor
                                              font:13
                                       isSizetoFit:NO
                                     textAlignment:NSTextAlignmentLeft];
    [self addSubview:self.timeLable];
}
- (void)setModel:(BLRechargeModel *)model{
    _model = model;
    [self.iconButton sd_setBackgroundImageWithURL:[NSURL URLWithString:model.face] forState:UIControlStateNormal];
    self.nickNameLable.text = model.username;
    self.timeLable.text = model.create_time;
    self.inputLable.text = model.price;
}
@end

